package com.hlbspringcloud.usercenter;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;
import org.springframework.web.client.RestTemplate;
import tk.mybatis.spring.annotation.MapperScan;

/**
 * @Description: springboot启动类
 * @PROJECT_NAME: spring-cloud-alibaba
 * @CLASS_NAME:
 * @Author: huanglibin
 * @Date: 2020-05-24 0:46
 * @Version: 1.0
 */
@SpringBootApplication
//扫描mybatis哪些包里面的接口
@MapperScan("com.hlbspringcloud")
public class UserCenterApplication {
    public static void main(String[] args) {
        SpringApplication.run(UserCenterApplication.class,args);
    }

    /**在spring容器中,创建一个对象,类型RestTemplate,名称/ID */
    @Bean
    public RestTemplate restTemplate(){
        return new RestTemplate();
    }
}
